extends "../../../azurlane_ctrl/Boss.gd"

var baseId = ""
func _extInit():
	._extInit()
	chaName = "「高级塞壬」测试者"   #角色的名称
	attInfox.maxHp = 10000
	attInfox.atk = 100
	attInfox.mgiAtk = 50
	attInfox.def = 50
	attInfox.dod = 0
	attInfox.atkRan = 8
	lv = 4            #等级的设置
	ename = "ceshizhe"
	addSkill("每{cd}秒令炮击最高的敌人对装甲最低的敌人发起2次炮击", "输出测试", "ceshizhe1", 12)
	addSkill("每{cd}秒赋予装甲最高的敌人5层<烧蚀>并对其发起3次炮击", "防御测试", "ceshizhe2", 12)
	addSkill("每{cd}秒令所有敌人对随机敌方单位发起一次炮击", "无尽试炼", "ceshizhe3", 12)

func _castCdSkill(id):
	._castCdSkill(id)
	if id == "ceshizhe1":
		ceshizhe1()
	if id == "ceshizhe2":
		ceshizhe2()
	if id == "ceshizhe3":
		ceshizhe3()				

func ceshizhe1():
	var cha = getFirstCha(1, "sortByAtkDesc", true)
	if cha == null:return
	var cha2 = getFirstCha(1, "sortByDef", true)
	if cha2 == null:return
	cha.normalAtkChara(cha2)
	if not cha2.isDeath and not cha.isDeath:
		cha.normalAtkChara(cha2)

func ceshizhe2():
	var cha = getFirstCha(1, "sortByDefDesc", true)
	castBuff(cha, buff.b_shaoShi.new(5))
	for i in range(3):
		if cha.isDeath:return
		.normalAtkChara(cha)

func ceshizhe3():
	for i in getAllChas(1):
		var cha = utils.getRndEnemy(self)
		i.normalAtkChara(cha)

func getItems():
	addItem(sys.newItem(itemData.rndGetEquipEx(itemData.EquipType.DEF)))		
	addItem(sys.newItem(itemData.rndGetEquipEx(itemData.EquipType.DEF)))		